package com.karateca.columbiaimports.http;

/**
 *
 * @author Administrator
 */
public interface HttpDownloader {

    /**
     * Do an HTTP GET request. The object will try to reconnect if the connection
     * is lost.
     * @param pageUrl URL for the request.
     * @return a string containing the data from the request.
     * @throws java.lang.Exception in case of error.
     */
    String doGet(String pageUrl) throws Exception;

    /**
     * Do an HTTP POST request. The object will try to reconnect if the connection
     * is lost.
     * @param pageUrl URL for the request.
     * @param postParams parameters sent in the querystring.
     * @return a string containing the data from the request.
     * @throws java.lang.Exception in case of error.
     */
    String doPost(String pageUrl, String postParams) throws Exception;

}
